<template>
  <div class="app">
    <div class="app-menu" :class="{'active':showMenu}">
      <Menu :routeName="routeName" />
    </div>
    <div class="app-main">
      <router-view />
    </div>
  </div>
</template>
<script>
// import { GetOs } from "../wailsjs/go/controller/System";
import Menu from "./components/Menu.vue";
export default {
  name: "AppView",
  components: {
    Menu,
  },
  computed: {
    routeName() {
      return this.$route.name;
    },
  },
  data(){
    return {
      showMenu:true
    }
  },
  created() {
    // GetOs().then((os) => {
    //   localStorage.setItem("os", os);
    //   console.log("GetOs")
    //   console.log(os);
    // });
  },
  methods: {
    
  },
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  width: 100vw;
  height: 100vh;
  background: #ffffff;
}
.app {
  position: relative;
  .app-menu {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 9999;
    width: 0;
    transition: width 0.5s;
    overflow-x: hidden;
    &.active {
      width: 250px;
      box-shadow: -10px 0px 60px 0px rgba(0, 0, 0, 0.5);
    }
  }
  .app-main {
    margin-left: 250px;
    width: calc(100vw - 250px);
    height: 100vh;
    overflow: auto;
  }
}
</style>
